package client.comm.baoding.dialog

import android.content.Context
import android.text.TextUtils
import client.comm.baoding.R
import client.comm.baoding.databinding.DialogQrdeladdrLayoutBinding
import client.tzstore.oo.dialog.CenterDialog

class QrDelAddrDialog : CenterDialog<DialogQrdeladdrLayoutBinding> {


    var msg: String? = ""

    constructor(context: Context) : super(context) {}

    constructor(context: Context, msg: String) : super(context) {
        this.msg = msg
    }

    override fun getV(): Int {
        return R.layout.dialog_qrdeladdr_layout
    }

    override fun postBinding() {
        if (!TextUtils.isEmpty(msg)) {
            binding.msg = msg
        } else
            binding.msg = "确认删除地址？"
        binding.event = this
    }

    var qrClick: (() -> Unit)? = null

    fun runQr() {
        qrClick?.let {
            it()
        }
        cancel()
    }

}